﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Lm.Common.Net;

namespace Lm.Common.Auth.Server.Services
{
    class ChangePasswordService : IRequestHandler
    {
        #region IRequestHandler 成员

        public object Handle(object request)
        {
            var changePasswordRequest = request as Lm.Common.Auth.Common.RequestResponseModel.ChangePassword.Request;
            new Lm.Common.Auth.Account.ChangePassword(changePasswordRequest.Token)
            .Change(changePasswordRequest.OldPassword,
                    changePasswordRequest.NewPassword1,
                    changePasswordRequest.NewPassword2);
            return new Lm.Common.Auth.Common.RequestResponseModel.ChangePassword.Response();
        }

        #endregion
    }
}
